package com.yonyou.crm.sact.visit.rmimpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yonyou.crm.common.page.entity.Page;
import com.yonyou.crm.sact.outwork.entity.TraceVO;
import com.yonyou.crm.sact.schedule.service.ScheduleTaskcardBizServiceImpl;
import com.yonyou.crm.sact.visit.entity.VisitsVO;
import com.yonyou.crm.sact.visit.rmitf.IVisitsRmService;
import com.yonyou.crm.sact.visit.service.VisitsBizServiceImpl;


@Service("visitsService")
public class VisitsRmServiceImpl implements IVisitsRmService {

	@Autowired
	private VisitsBizServiceImpl bizService;
	
	public Page<VisitsVO> getList(Page<VisitsVO> page,Map<String, Object> paraMap) {
		return bizService.getList(page, paraMap);
	}
	
	public VisitsVO getDetail(Long id) {
		return bizService.getDetail(id);
	}
	
	public VisitsVO insert(VisitsVO visit) {
		visit = bizService.save(visit);
		bizService.saveScheduleTaskcard(visit);
		return visit;
	}
	
	public VisitsVO update(VisitsVO visit) {
		return bizService.update(visit);
	}
	
	public VisitsVO summary(VisitsVO visit){
		return bizService.summary(visit);
	}
	
	public int delete(Long id) {
		return bizService.delete(id);
	}
	
	public VisitsVO location(Long id, TraceVO trace) {
		return bizService.location(id, trace);
	}
	
	public Page<VisitsVO> batchDelete(String[] ids, Page<VisitsVO> page,Map<String, Object> paraMap) {
		bizService.batchDelete(ids);
		return bizService.getList(page, paraMap);
	}
	
	public Object selectFieldsByIds(Object[] ids) {
		return bizService.selectFieldsByIds(ids);
	}
	
	public List<VisitsVO> getScheduleList(Map<String, Object> paraMap){
		return bizService.getScheduleList(paraMap);
	}
	
	public List<String> getScheduleDateList(Map<String, Object> paraMap){
		return bizService.getScheduleDateList(paraMap);
	}
	
	public VisitsVO getLocation(Long id){
		return bizService.getLocation(id);
	}
	
	public VisitsVO getSummary(Long id){
		return bizService.getSummary(id);
	}
	
}
